class FavoritesListModel {
  Like like;
  Like collect;
  Like player;

  FavoritesListModel({this.like, this.collect, this.player});

  FavoritesListModel.fromJson(Map<String, dynamic> json) {
    like = json['like'] != null ? new Like.fromJson(json['like']) : null;
    collect =
    json['collect'] != null ? new Like.fromJson(json['collect']) : null;
    player = json['player'] != null ? new Like.fromJson(json['player']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.like != null) {
      data['like'] = this.like.toJson();
    }
    if (this.collect != null) {
      data['collect'] = this.collect.toJson();
    }
    if (this.player != null) {
      data['player'] = this.player.toJson();
    }
    return data;
  }
}

class Like {
  List<LikeData> data;
  int count;

  Like({this.data, this.count});

  Like.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = new List<LikeData>();
      json['data'].forEach((v) {
        data.add(new LikeData.fromJson(v));
      });
    }
    count = json['count'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    data['count'] = this.count;
    return data;
  }
}

class PlayerData {
  int id;
  String courseTitle;
  String profile;
  String status;
  int tid;
  String audioUrl;
  String soundContent;
  String language;
  String time;
  String headImg;
  String name;
  int like;
  int collect;
  int player;

  PlayerData(
      {this.id,
        this.courseTitle,
        this.profile,
        this.status,
        this.tid,
        this.audioUrl,
        this.soundContent,
        this.language,
        this.time,
        this.headImg,
        this.name,
        this.like,
        this.collect,
        this.player});

  PlayerData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    courseTitle = json['course_title'];
    profile = json['profile'];
    status = json['status'];
    tid = json['tid'];
    audioUrl = json['audio_url'];
    soundContent = json['sound_content'];
    language = json['language'];
    time = json['time'];
    headImg = json['head_img'];
    name = json['name'];
    like = json['like'];
    collect = json['collect'];
    player = json['player'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['course_title'] = this.courseTitle;
    data['profile'] = this.profile;
    data['status'] = this.status;
    data['tid'] = this.tid;
    data['audio_url'] = this.audioUrl;
    data['sound_content'] = this.soundContent;
    data['language'] = this.language;
    data['time'] = this.time;
    data['head_img'] = this.headImg;
    data['name'] = this.name;
    data['like'] = this.like;
    data['collect'] = this.collect;
    data['player'] = this.player;
    return data;
  }
}

class LikeData {
  int id;
  String courseTitle;
  String profile;
  String status;
  int tid;
  String audioUrl;
  String language;
  String soundContent;
  String time;
  String headImg;
  String name;

  LikeData(
      {this.id,
        this.courseTitle,
        this.profile,
        this.status,
        this.tid,
        this.audioUrl,
        this.language,
        this.soundContent,
        this.time,
        this.headImg,
        this.name});

  LikeData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    courseTitle = json['course_title'];
    profile = json['profile'];
    status = json['status'];
    tid = json['tid'];
    audioUrl = json['audio_url'];
    language = json['language'];
    soundContent = json['sound_content'];
    time = json['time'];
    headImg = json['head_img'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['course_title'] = this.courseTitle;
    data['profile'] = this.profile;
    data['status'] = this.status;
    data['tid'] = this.tid;
    data['audio_url'] = this.audioUrl;
    data['language'] = this.language;
    data['sound_content'] = this.soundContent;
    data['time'] = this.time;
    data['head_img'] = this.headImg;
    data['name'] = this.name;
    return data;
  }
}
